# Contributor: Minecrell <minecrell@minecrell.net>
# Maintainer: Minecrell <minecrell@minecrell.net>
pkgname=tinycompress
pkgver=1.2.3
pkgrel=0
pkgdesc="Userspace library for ALSA compressed APIs"
url="https://www.alsa-project.org"
arch="all"
license="BSD-3-Clause OR LGPL-2.1-only"
makedepends="linux-headers ffmpeg-dev"
subpackages="$pkgname-dev $pkgname-fcplay"
source="ftp://ftp.alsa-project.org/pub/tinycompress/tinycompress-$pkgver.tar.bz2"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-fcplay
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

fcplay() {
	pkgdesc="$pkgdesc (fcplay tool)"
	license="LGPL-2.1-only"

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/fcplay "$subpkgdir"/usr/bin/fcplay
}

sha512sums="fd68b12f76ff2044ba7a11e215b211f5e35a14ff2c71dc3504b20f7adafa774cfb2a731e7f1615cb736a7171d9cf8cd4af3c44776954ea9ad717dc19abbcbcfb  tinycompress-1.2.3.tar.bz2"
